using Shared.Domain.Shared.Enums.UserService;
using SqlSugar;
using Volo.Abp.Auditing;
using Volo.Abp.Domain.Entities;

namespace UserService.Domain.Entities;

/// <summary>
/// 用户资料实体 - 存储用户的详细个人信息
/// </summary>
[SugarTable("UserProfiles")]
public class UserProfile : Entity<Guid>, IHasCreationTime, IHasModificationTime
{
    /// <summary>
    /// 用户资料唯一标识
    /// </summary>
    [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
    public override Guid Id { get; protected set; }

    /// <summary>
    /// 关联的用户ID
    /// </summary>
    [SugarColumn(IsNullable = false)]
    public Guid UserId { get; set; }

    /// <summary>
    /// 用户昵称
    /// </summary>
    [SugarColumn(Length = 50, IsNullable = true)]
    public string NickName { get; set; }

    /// <summary>
    /// 用户头像URL
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public string AvatarUrl { get; set; }

    /// <summary>
    /// 个性签名
    /// </summary>
    [SugarColumn(Length = 200, IsNullable = true)]
    public string Signature { get; set; }

    /// <summary>
    /// 性别
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public Gender? Gender { get; set; }

    /// <summary>
    /// 出生日期
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public DateTime? Birthday { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [SugarColumn(IsNullable = false)]
    public DateTime CreationTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 最后更新时间
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public DateTime? LastModificationTime { get; set; }
}